package com.sykj.qiaoli.controller;

import com.sykj.qiaoli.bean.casea.CaseSealApplyfor;
import com.sykj.qiaoli.service.CaseSealApplyforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @program: low-office
 * @description: 印章申请 -文案
 * @author: qiaoli
 * @create: 2020-05-19 10:55
 */
@RestController
@RequestMapping("/sealApplyfor")
public class CaseSealApplyforController {
    @Autowired
    CaseSealApplyforService caseSealApplyforService;
    @RequestMapping("/queryAll")
    public List<CaseSealApplyfor> queryAll(){
        return caseSealApplyforService.queryAll();
    }
    @RequestMapping("/selectBycondition")
    public List<CaseSealApplyfor>  SelectByCondition(
            @RequestParam(value ="caseLawId",required = false ) String caseLawId,
            @RequestParam(value ="applyforApprovalStatus",required = false ) String applyforApprovalStatus,
            @RequestParam(value ="applyforReceiveStart",required = false ) String applyforReceiveStart,
            @RequestParam(value ="applyforReceiveEnd",required = false ) String applyforReceiveEnd,
            @RequestParam(value ="caseCaseTypeId",required = false ) String caseCaseTypeId
            ){
        Map<String, Object> map=new HashMap<>();
        map.put("applyforApprovalStatus",applyforApprovalStatus);
        map.put("caseLawId",caseLawId);
        map.put("applyforReceiveStart",applyforReceiveStart);
        map.put("applyforReceiveEnd",applyforReceiveEnd);
        map.put("caseCaseTypeId",caseCaseTypeId);
        return caseSealApplyforService.queryByCondition(map);
    }
}
